export interface TornaReply<D> {
  code: string,
  data: D,
  msg: string
}
export interface TornaLoginData {
  status: number
  token: string
}
export interface TornaSpaceItem {
  creatorName: string;
  gmtCreate: string;
  id: string;
  isCompose: number;
  name: string;
}

export interface TornaProjectItem {
  creatorName: string;
  description: string;
  gmtCreate: string;
  id: string;
  isPrivate: number;
  modifierName: string;
  name: string;
  roleCode: string;
  spaceId: string;
  spaceName: string;
}
export interface TornaModuleItem {
  id: string;
  importUrl: string;
  name: string;
  type: number;
  projectId: string;
  projectName: string;
  spaceId: string;
  spaceName: string;
}
export interface TornaDocItem {
  author: string;
  contentType: string;
  creatorName: string;
  description: string;
  gmtCreate: string;
  gmtModified: string;
  httpMethod: string;
  id: string;
  isDeleted: number;
  isFolder: number;
  isLocked: number;
  isShow: number;
  modifierName: string;
  name: string;
  orderIndex: number;
  parentId: string;
  url: string;
  namePath: string;
  spaceId: string;
  spaceName: string;
  projectId: string;
  projectName: string;
  moduleId: string;
  moduleName: string;
}

export interface TsTypeInfo {
  node: TornaParamInfo;
  parent: () => TsTypeInfo | undefined;
  typeName: string;
  fieldHeads: string[];
  fieldBodies: string[];
  fieldTails: string[];
}

export interface StringGanarator<T> {
  (t: T): string
}
export type Somethings = { [key in string]?: any };
export interface TornaDocDetail extends Somethings {
  author: string;
  baseUrl: string;
  contentType: string;
  creatorName: string;
  debugEnvs: DebugEnv[];
  description: string;
  errorCodeParams: any[];
  globalHeaders: any[];
  globalParams: any[];
  globalReturns: any[];
  gmtCreate: string;
  gmtModified: string;
  headerParams: TornaParamInfo[];
  httpMethod: string;
  id: string;
  isDeleted: number;
  isFolder: number;
  isLocked: number;
  isRequestArray: number;
  isResponseArray: number;
  isShow: number;
  isUseGlobalHeaders: number;
  isUseGlobalParams: number;
  isUseGlobalReturns: number;
  modifierName: string;
  moduleId: string;
  moduleType: number;
  name: string;
  orderIndex: number;
  parentId: string;
  pathParams: any[];
  projectId: string;
  queryParams: TornaParamInfo[];
  remark: string;
  requestArrayType: string;
  requestParams: any[];
  responseArrayType: string;
  responseParams: TornaParamInfo[];
  type: number;
  url: string;
}

export interface DebugEnv {
  id: string;
  isPublic: number;
  moduleId: string;
  name: string;
  url: string;
}

export interface TornaParamInfo {
  children?: any;
  createMode: number;
  creatorName: string;
  description: string;
  docId: string;
  enumId: string;
  enumInfo?: any;
  example: string;
  global: boolean;
  gmtCreate: string;
  gmtModified: string;
  id: string;
  isDeleted: number;
  maxLength: string;
  modifierName: string;
  modifyMode: number;
  name: string;
  orderIndex: number;
  parentId: string;
  required: number;
  style: number;
  type: string;
}